{__NOLAYOUT__}
<div toplayer="1" class="wrap-box wrap-pb2 " id="<?php echo $funcid;?>" summaryid="Department" baseurl="<?php echo U('Department/index'); ?>">

   <div class="wrap-box-info ">
      <div class="wrap-title abe-ofl">
         <div class="tit abe-fl">部门信息</div>
         <div class="abe-fr">
               <a href="javascript:void(0);"  class=" vi-blue " default-status="1" onclick="return _asr.openLink('','<?php echo "$funcid"; ?>','刷新',1); "><i class="iconfont ">&#xe611;</i> 刷新</a>
         </div>
      </div>

      <div class="order-step">
         <dl>
            <?php if(is_array($step)):
                 $i = 0;
                 $__LIST__ = $step;
                 if( count($__LIST__) == 0) :
                     echo "";
                 else:
                     foreach($__LIST__ as $key=>$item):
                        if($key>0): ?>
                        <dd <?php if($item['type']=='after') echo "class='after'"; elseif ($item['type']=='current') echo "class='current'"; elseif ($item['type']=='cancel') echo "class='cancel-faq'"; ?>><i class="iconfont">&#xe619;</i></dd>
                        <?php endif; ?>
                        <dt <?php if($item['type']=='after') echo "class='after'"; elseif ($item['type']=='current') echo "class='current'"; elseif ($item['type']=='cancel') echo "class='cancel-faq'"; ?>>
                           <div <?php if($item['type']=='cancel') echo "class='iconfont'"; ?> ><?php echo $item['no'];?></div>
                           <span><?php echo $item['desc'];?></span>
                           <time><?php echo $item['time'];?></time>
                        </dt>
                    <?php endforeach;
                 endif;
               endif; ?>
           </dl>
      </div>

      <div class="table-box">
         <div class="table-in">
            <div class="pub-par-title ppt-ico-box">
               <span class="abe-fl vi-blue abe-ft14">基本信息</span>
               <div class="abe-fr">
          <?php if (isset($rights['edit_base']) && $rights['edit_base']): ?>
          <?php if ($search['status']==0): ?>
               <a href="javascript:void(0);"  class=" vi-blue vi-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Department/index?func=edit_base&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Department_edit_base","id=$search[id]");?>'); "> 编辑</a>
          <?php endif; ?>
          <?php endif; ?>
               </div>
            </div>

     <table border="0" cellspacing="0" cellpadding="0" class="pub-table-par">
        <colgroup>
           <col style="width:9%;"/>
           <col style="width:24%;"/>
           <col style="width:9%;"/>
           <col style="width:24%;"/>
           <col style="width:9%;"/>
           <col style="width:24%;"/>
        </colgroup>
        <tbody>

           <tr class= "even">
             <th>公司</th>
             <td><?php echo get_table_Company_byID("$search[company_id]","name"); ?></td>
             <th>上级</th>
             <td><?php echo get_table_Department_byID("$search[parent_id]","name"); ?></td>
             <th>修改时间</th>
             <td><?php echo system_format("DT", $search["modify_time"],1); ?><em class="abe-space-sm"></em><?php echo $search["modify_user"]; ?></td>
           </tr>
           <tr class= "odd">
             <th>代码</th>
             <td><?php echo $search["code"]; ?></td>
             <th>层级</th>
             <td><?php echo $search["level"]; ?></td>
             <th>状态</th>
             <td><?php echo get_table_Department_status("$search[status]","name"); ?></td>
           </tr>
           <tr class= "even">
             <th>名称</th>
             <td><?php echo $search["name"]; ?></td>
             <th>创建时间</th>
             <td><?php echo system_format("DT", $search["create_time"],1); ?><em class="abe-space-sm"></em><?php echo $search["create_user"]; ?></td>
             <th></th>
             <td></td>
           </tr>

        </tbody>
     </table>
         </div>
      </div>





       <div class="table-box">
         <div class="table-in">
            <form action="<?php echo U('Department/index?func=view'); ?>" id="<?php echo "$funcid"; ?>-Search" method="get">
                <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
                <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
                <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
                <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
                <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />


                <input type="hidden" name="_tab" value="<?php echo $search["_tab"]; ?>" />

                <input type="hidden" name="_tab_caozuorizhi_p" value="<?php echo $search["_tab_caozuorizhi_p"]; ?>" />
                <input type="hidden" name="_tab_caozuorizhi_psize" value="<?php echo $search["_tab_caozuorizhi_psize"]; ?>" />

                  <!--表单-->
                  <div class="order-det-ptab">
                    <div class="od-info abe-fl" >
                      <a href="#" onclick="return _asr.tabsheet('<?php echo $funcid;?>', '<?php echo "$funcid"; ?>-Search', 'caozuorizhi');" <?php if($search['_tab'] == 'caozuorizhi'): ?> class="current"<?php endif;?>>操作日志</a>
                    </div>

              <div class="abe-fl screening pbtab-search pbtab-col2">
<!-- 搜索关闭状态，按需要打开
                 <ul class="form form-mod-new">
                 <?php if ($search['_tab']=='caozuorizhi'): ?>
                    <li>
                       <div class="unit-left">
                          内容
                       </div>
                       <div class="unit-mid">
                          <div class="textbox">
                              <input type="text" class="pbtxt txt0" name="tab_caozuorizhi_content"  value="<?php echo $search['tab_caozuorizhi_content']; ?>"   placeholder=" 直接进行模糊搜索 ">
                          </div>
                       </div>
                    </li>
                 <?php endif; ?>

          <?php if (isset($rights['search']) && $rights['search']): ?>
               <input type="button" value="搜索" class="btn btn btn-sm abe-fl btn-org mlg_5 " default-status="1" onclick="return _asr.submit('<?php echo "$funcid"; ?>', '<?php echo "$funcid"; ?>-Search', '<?php echo U("/Home/Department/index?func=view&") ; ?>',''); " />
          <?php endif; ?>
                 </ul>

搜索关闭状态，按需要打开 -->

              </div>

              <div class="abe-fr">
          <?php if (isset($rights['detail_import']) && $rights['detail_import']): ?>
          <?php if ($search[_tab]=='caozuorizhi'): ?>
               <a href="javascript:void(0);"  class=" vi-blue vi-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Department/index?func=detail_import&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Department_detail_import","id=$search[id]");?>'); "> 明细导入</a>
          <?php endif; ?>
          <?php endif; ?>
          <?php if (isset($rights['detail_select']) && $rights['detail_select']): ?>
          <?php if ($search[_tab]=='caozuorizhi'): ?>
               <a href="javascript:void(0);"  class=" vi-blue vi-blue mlg_10 " default-status="1" onclick="return _asr.popupFun('<?php echo U("/Home/Department/index?func=selectproduct&id=$search[id]") ; ?>', '<?php echo filterFuncId("/Home/Department_selectproduct","id=$search[id]");?>'); "> 明细选择</a>
          <?php endif; ?>
          <?php endif; ?>
              </div>
            </div>
          </form>
        </div>
      </div>



              <?php if ($search['_tab']=='caozuorizhi'): ?>
                <div class="table-box">
                  <div class="table-in">
                    <form id="<?php echo "$funcid"; ?>-Result"  action="<?php U('Department/op'); ?>" method="post">
                      <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
                      <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
                      <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
                      <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
                      <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />
                      <table border="0" cellspacing="0" cellpadding="0" class="pub-table-par pub-t-faq">
                        <colgroup>
                          <col style="width: 40px ;">
                          <col style="width: 80px ;">
                          <col style="width: 150px ;">
                          <col style="width: 80px ;">
                          <col style="width: 80px ;">
                          <col style="width: 100px ;">
                          <col style="width: 100px ;">
                           <col style="width:auto" >
                        </colgroup>
                        <tbody>
                          <tr>
                            <th><input type="checkbox"  onclick="_asr.selectAll(this);"> &nbsp;#</th>
                            <th>状态</th>
                            <th>处理时间</th>
                            <th>类型</th>
                            <th class="abe-txtl">代码</th>
                            <th class="abe-txtl">标题</th>
                            <th class="abe-txtl">内容</th>
                           <th></th >
                          </tr>
                          <?php if(is_array($list)):
                            $i = 0;
                            $__LIST__ = $list;
                            if( count($__LIST__) == 0) :
                                echo "";
                            else:
                                foreach($__LIST__ as $key=>$master): $mod = ($i % 2 );++$i; ?>
                                  <tr <?php if($mod == "1"): ?>class="even"<?php endif; if($mod == "0"): ?>class="odd"<?php endif; ?>>
                                    <!-- 选择 -->
                                    <td><input type="checkbox" name="Key[]" data-type="select" onclick="_asr.selectMulit(this);" value="<?php echo $master['id'] ;?>">&nbsp; <?php echo $i + ($page_size * ($p - 1)); ?></td>
                                    <td><?php echo $master["status"]; ?></td>
                                    <td><?php echo system_format("DT", $master["create_time"],1); ?></td>
                                    <td><?php echo get_table_LogCommon_type("$master[type]","name",""); ?></td>
                                    <td  class="abe-txtl"><?php echo $master["data_code"]; ?></td>
                                    <td  class="abe-txtl"><?php echo $master["subject"]; ?></td>
                                    <td  class="abe-txtl"><div class="newline"><?php echo OverView($master["content"],150,"..."); ?></div></td>
                           <tr></tr >
                                  </tr>
                                  <?php endforeach; ?>
                                <?php
                            endif;
                        else:
                            echo ""
                        ;endif; ?>
                        </tbody>
                      </table>
                    </form>
                  </div>
                </div>
              <?php endif; ?>



      <div class="blank5"></div>
   </div>

   <div class="data-oper" >
        <?php echo $page; ?>
   </div>

   <div class="blank30"></div>
</div>
    <script>
        function <?php echo $funcid; ?>_chooseDate(o) {
            if($('.date').length>0)
                pickmeup('.date').destroy();
            $('.date').removeClass('date')
            $(o).addClass('date');
            pickmeup('.date', {
                format  : 'Y-m-d',
                date : $(o).val(),
                hide_on_select : true,
                locale : 'zh'
            }).show();
        }

        $('.calendar0,.calendar1').on('click',function(){
            <?php echo $funcid; ?>_chooseDate(this)
        });

        /***************************************************************************************/
        /* 前台页面初始化                                                                      */
        /***************************************************************************************/
        function <?php echo $funcid; ?>_init(_id){
            return ;
        }


    {:W('Summary/javascript',array('Department'))}


    </script>


